/**
 * @author Aaron
 * @createTime 10:24 2022/6/9
 **/
package services

import (
	"longmen/server/pkg/common/api_models"
	"longmen/server/pkg/db/mysql/db_main"
)

func GetPropList(propsType int) ([]*api_models.Props, error) {
	params := make(map[string]interface{})
	params["status"] = 1
	if propsType != 0 {
		params["type"] = propsType
	}
	props, err := db_main.GetPropsParam(params, "weight DESC")
	if err != nil {
		return nil, err
	}
	return props, nil
}
